const appAction = {
    // setMenus:(n=[])=>{
    //     const list = n.filter(v=>v.path==='/')[0].children.map((item,index)=>{
    //         if(item.children){
    //             item.newArr = item.children.map(item2=>(getItem(item2.title,item2.path)))
    //         }
    //         if(item.path){
    //             return {
    //                 ...getItem(item.title,item.path,null,item.newArr)
    //             }
    //         }
    //         return{
    //         }
    //     })
    //     console.log(list,'===------')
    //     return { type: 'SET_MENUS', payload: list }
    // }
    setCount(n){
        return {type:'SET_COUNT',payload:n}
    }
}

const getItem = (label, key, icon, children, type) => {
    return{
        key,
        icon,
        children,
        label,
        type
    }
}
export default appAction
